<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
	<title>修改用户信息</title>
	 <link rel="stylesheet" type="text/css" href="/AppStore/Public/bootstrap/css/bootstrap.min.css"> 
    <script src="/AppStore/Public/bootstrap/js/jquery.min.js"></script>
    <script src="/AppStore/Public/bootstrap/js/bootstrap.min.js"></script>
    <style type="text/css">
    .img{
    	height: 150px;

    	}</style>
</head>
<body>
<!-- 自动接收updateUserInfo方法传来的user变量-->
<div class="container">
<h1>修改用户信息：</h1>
<form name="f1"  method="post" action="update" enctype="multipart/form-data" class="form-horizontal">
    <input type="hidden" name="id"  value="<?php echo ($user["id"]); ?>"></input> <!-- 隐藏ID -->
    <div class="form-group">
    <label for="username" class="col-sm-2 control-label">用户名:</label>
    <div class="col-sm-6">
    <input type="text" class="form-control" id="username" name="username" placeholder="username"  value="<?php echo ($user["username"]); ?>">
    </div></div>

    <div class="form-group">
    <label for="pass" class="col-sm-2 control-label">密码:</label>
    <div class="col-sm-6">
    <input type="password" class="form-control" id="pass" name="pass"  placeholder="password" value="<?php echo ($user["pass"]); ?>">
    </div></div>
<!-- 
    <div class="form-group">
    <label for="pass2" class="col-sm-2 control-label">确认密码:</label>
    <div class="col-sm-6">
    <input type="password" class="form-control" id="pass2" name="pass2"  placeholder="confirm password" >
    </div></div> -->
     
    <div class="form-group">
    <label for="email" class="col-sm-2 control-label">Email address</label>
    <div class="col-sm-6">
    <input type="email" class="form-control" id="email" name="email" placeholder="Email" value="<?php echo ($user["email"]); ?>">
    </div></div>


    <div class="form-group">
    <label for="tele" class="col-sm-2 control-label">电话</label>
    <div class="col-sm-6">
    <input type="tel" class="form-control" id="tele" name="tele" placeholder="telephone" value="<?php echo ($user["tel"]); ?>"></input>
    </div></div>

    <div class="form-group">
    <label for="realname" class="col-sm-2 control-label">姓名:</label>
    <div class="col-sm-6">
    <input type="text" class="form-control" id="realname" name="realneme" placeholder="realname" value="<?php echo ($user["realname"]); ?>">
    </div></div>

    <div class="form-group">
    <label for="exampleInputFile" class="col-sm-2 control-label" >头像:</label>
    <div class="col-sm-6">
    <img src="/AppStore/Public/Upload/photo/<?php echo ($user["photo"]); ?>" alt="图像不存在" class="img">
    <input type="file" id="exampleInputFile" name="photo">
    </div></div>

    <div class="form-group">
    <label class="col-sm-2 control-label" >自我介绍:</label>
     <div class="col-sm-6">
    <textarea class="form-control" rows="3" cols=""name="intro"><?php echo ($user["intro"]); ?></textarea>
    </div></div>

    <div class="form-group">
    <label class="col-sm-2 control-label">是否明星作者:</label>
    <div class="col-sm-6">
    <label class="radio-inline">
    <input type="radio"  id="inlineRadio1" name="isstar"value="0" 
    <?php if($user["isstar"] == 0): ?>checked<?php endif; ?>>否</label>
    <label class="radio-inline">
    <input type="radio"  id="inlineRadio2" name="isstar" value="1"
    <?php if($user["isstar"] == 1): ?>checked<?php endif; ?>>是 </label>
    </div></div>
 
    <div class="form-group">
    <label class="col-sm-2 control-label">是否首页推荐:</label>
    <div class="col-sm-6">
    <label class="radio-inline">
    <input type="radio"  id="inlineRadio1" name="isfirst"value="0"
    <?php if($user["isfirst"] == 0): ?>checked<?php endif; ?>>否</label>
    <label class="radio-inline">
    <input type="radio"  id="inlineRadio2" name="isfirst" value="1"
    <?php if($user["isfirst"] == 1): ?>checked<?php endif; ?>>是 </label>
    </div></div>

    <div class="form-group">
    <label class="col-sm-2 control-label">操作:</label>
    <div class="col-sm-6">
    <label class="radio-inline">
    <input type="radio"  id="inlineRadio1" name="state"value="0"
    <?php if($user["state"] == 0): ?>checked<?php endif; ?>>禁用</label>
    <label class="radio-inline">
    <input type="radio"  id="inlineRadio2" name="state" value="1"
    <?php if($user["state"] == 1): ?>checked<?php endif; ?>>普通</label>
    <label class="radio-inline">
    <input type="radio"  id="inlineRadio1" name="state"value="2"
    <?php if($user["state"] == 2): ?>checked<?php endif; ?>>禁言</label>
    </div></div>

    <div class="form-group">
    <div class="col-sm-offset-2 col-sm-6">
    <button type="submit" class="btn btn-default" >修改用户</button>
    </div></div>
    </form>
    </div>
</body>
</html>